/*
 * @Description:
 * @Author: ldx
 * @Date: 2022-09-17 22:04:14
 * @LastEditors: ldx
 * @LastEditTime: 2022-09-18 20:37:04
 */
import axios from '@/utils/axios'

import { Pagination } from '../types'
/** 日志分页列表 */
export async function queryAuditLog(
  { current, pageSize }: Pagination,
  params: any
): Promise<any> {
  return axios
    .post<any & Pagination, any>(`/ivr/audit-log/page`, {
      ...params,
      pageSize,
      pageNum: current
    })
    .then((res) => ({
      total: res.data.total,
      list: res.data.records
    }))
}
/** 日志类型集合 */
export const queryCategory = (): Promise<any> => {
  return axios.post<unknown, any>(`/ivr/audit-log/category/list`)
}
